<?php

use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
use Illuminate\Support\Facades\DB;
class CreateRedEnvelopepeDetailsTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('red_envelopepe_details', function (Blueprint $table) {
            $table->id();
            $table->integer('red_envelopes_id')->comment('红包ID');
            $table->integer('user_id')->comment('抢包用户ID');
            $table->integer('money')->comment('抢包金额');
            $table->timestamps();
        });
        DB::statement("alter table `red_envelopepe_details` comment'红包详情表'");
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::dropIfExists('red_envelopepe_details');
    }
}
